package com.hl.vcd.utils;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author 朱炫达
 */
@Component
public class ConstantPropertiesUtil implements InitializingBean {

    @Value("${mail.host}")
    private String mail_host;
    @Value("${mail.account}")
    private String mail_account;
    @Value("${mail.username}")
    private String mail_username;
    @Value("${mail.code}")
    private String mail_code;

    public static String MAIL_HOST;
    public static String MAIL_ACCOUNT;
    public static String MAIL_USERNAME;
    public static String MAIL_CODE;

    @Override
    public void afterPropertiesSet() throws Exception {
        MAIL_HOST = mail_host;
        MAIL_ACCOUNT = mail_account;
        MAIL_USERNAME = mail_username;
        MAIL_CODE = mail_code;
    }
}
